<template>
  <a-button class="audit-pass" type="primary" @click="auditPass()">
    <template #icon><UserOutlined /></template>
    回退
  </a-button>
</template>
  
  <script lang="ts" setup>
  import { ExclamationCircleOutlined, UserOutlined } from '@ant-design/icons-vue'
  import { Modal } from 'ant-design-vue'
  import { createVNode } from 'vue'
  
  const emit = defineEmits(['auditPass'])
  const auditPass = (): void => {
    Modal.confirm({
      title: '请确认回退交接',
      content: `是否回退交接？`,
      icon: createVNode(ExclamationCircleOutlined),
      onOk: () => {
        emit('auditPass')
      },
      okText: '通过',
      cancelText: '取消',
    })
  }
  </script>
  
  <style lang="less" scoped>
  .audit-pass {
    width: 110px;
    height: 32px;
    background: rgba(255, 153, 0, 1);
    border-radius: 8px;
    border: 1px solid #ffffff;
  }
  </style>
  